﻿@{
    ViewBag.Title = "qunit hello world";
    Layout = "~/Views/Shared/_ContentLayout.cshtml";
}


@section bottom{
    <script>
        $(function () {

            setTimeout(function () {
                return;
                QUnit.test("prettydate_basics", function (assert) {
                    var now = "2008/01/28 22:25:00";
                    assert.equal(prettyDate(now, "2008/01/28 22:24:30"), "just now");
                    assert.equal(prettyDate(now, "2008/01/28 22:23:30"), "1 minute ago");
                    assert.equal(prettyDate(now, "2008/01/28 21:23:30"), "1 hour ago");
                    assert.equal(prettyDate(now, "2008/01/27 22:23:30"), "Yesterday");
                    assert.equal(prettyDate(now, "2008/01/26 22:23:30"), "2 days ago");
                    assert.equal(prettyDate(now, "2007/01/26 22:23:30"), undefined);
                });
            },1000);
           
        });
    </script>
}

<script src="//code.jquery.com/qunit/qunit-1.15.0.js"></script>
<script>
    function prettyDate(now, time) {
        var date = new Date(time || ""),
            diff = (((new Date(now)).getTime() - date.getTime()) / 1000),
            day_diff = Math.floor(diff / 86400);

        if (isNaN(day_diff) || day_diff < 0 || day_diff >= 31)
            return;

        return day_diff == 0 && (
                diff < 60 && "just now" ||
                    diff < 120 && "1 minute ago" ||
                    diff < 3600 && Math.floor(diff / 60) +
                    " minutes ago" ||
                    diff < 7200 && "1 hour ago" ||
                    diff < 86400 && Math.floor(diff / 3600) +
                    " hours ago") ||
            day_diff == 1 && "Yesterday" ||
            day_diff < 7 && day_diff + " days ago" ||
            day_diff < 31 && Math.ceil(day_diff / 7) +
            " weeks ago";
    }


</script>

<div class="page-content">
   
   
    <div class="page-header">
        <h1>
            Nestable lists
            <small>
                <i class="ace-icon fa fa-angle-double-right"></i>
                Drag &amp; drop hierarchical list
            </small>
        </h1>
    </div><!-- /.page-header -->

    <div class="row">
        <div class="col-xs-12">
            <!-- PAGE CONTENT BEGINS -->
            <div class="row">
                <div class="col-sm-6">
                    <div class="dd dd-draghandle">
                        <ol class="dd-list">
                            <li class="dd-item dd2-item" data-id="13">
                                <div class="dd-handle dd2-handle">
                                    <i class="normal-icon ace-icon fa fa-comments blue bigger-130"></i>

                                    <i class="drag-icon ace-icon fa fa-arrows bigger-125"></i>
                                </div>
                                <div class="dd2-content"><a href="#">adminLte</a></div>
                            </li>

                            <li class="dd-item dd2-item" data-id="14">
                                <div class="dd-handle dd2-handle">
                                    <i class="normal-icon ace-icon fa fa-clock-o pink bigger-130"></i>

                                    <i class="drag-icon ace-icon fa fa-arrows bigger-125"></i>
                                </div>
                                <div class="dd2-content">Recent Posts</div>
                            </li>

                            <li class="dd-item dd2-item" data-id="15">
                                <button data-action="collapse" type="button">Collapse</button><button data-action="expand" type="button" style="display: none;">Expand</button>
                                <div class="dd-handle dd2-handle">
                                    <i class="normal-icon ace-icon fa fa-signal orange bigger-130"></i>

                                    <i class="drag-icon ace-icon fa fa-arrows bigger-125"></i>
                                </div>
                                <div class="dd2-content">Statistics</div>

                                <ol class="dd-list">
                                    <li class="dd-item dd2-item" data-id="16">
                                        <div class="dd-handle dd2-handle">
                                            <i class="normal-icon ace-icon fa fa-user red bigger-130"></i>

                                            <i class="drag-icon ace-icon fa fa-arrows bigger-125"></i>
                                        </div>
                                        <div class="dd2-content">Active Users</div>
                                    </li>

                                    <li class="dd-item dd2-item dd-colored" data-id="17">
                                        <div class="dd-handle dd2-handle btn-info">
                                            <i class="normal-icon ace-icon fa fa-pencil-square-o bigger-130"></i>

                                            <i class="drag-icon ace-icon fa fa-arrows bigger-125"></i>
                                        </div>
                                        <div class="dd2-content btn-info no-hover">Published Articles</div>
                                    </li>

                                    <li class="dd-item dd2-item" data-id="18">
                                        <div class="dd-handle dd2-handle">
                                            <i class="normal-icon ace-icon fa fa-eye green bigger-130"></i>

                                            <i class="drag-icon ace-icon fa fa-arrows bigger-125"></i>
                                        </div>
                                        <div class="dd2-content">Visitors</div>
                                    </li>
                                </ol>
                            </li>

                            <li class="dd-item dd2-item" data-id="19">
                                <div class="dd-handle dd2-handle">
                                    <i class="normal-icon ace-icon fa fa-bars blue bigger-130"></i>

                                    <i class="drag-icon ace-icon fa fa-arrows bigger-125"></i>
                                </div>
                                <div class="dd2-content">Menu</div>
                            </li>
                        </ol>
                    </div>
                </div>
            </div><!-- PAGE CONTENT ENDS -->
        </div><!-- /.col -->
    </div><!-- /.row -->
</div>